package com.codefish;

/**
 * 电脑抽象类
 *
 * @author codefish
 * @version 1.0
 * @date 2022/06/06 下午 09:55
 */
public abstract class AbstractComputer {
    /**
     * 电脑品牌
     */
    protected String pcBrand;
    /**
     * 电脑所安装的内存条
     */
    protected AbstractMemory memory;

    public AbstractComputer(String pcBrand, AbstractMemory memory) {
        this.pcBrand = pcBrand;
        this.memory = memory;
    }

    /**
     * 更换内存条
     *
     * @param memory 新的内存条
     */
    public void replaceMemory(AbstractMemory memory) {
        this.memory = memory;
    }

    /**
     * 获取电脑配置信息
     */
    public abstract void getInfo();
}
